<?php
/**
 * Created by PhpStorm.
 * User: liu85
 * Date: 2018/1/29
 * Time: 0:16
 */

namespace app\common\helper;


class SystemHelper
{
    public static function getRunTime(){
        $arRuntime =explode(",", exec('uptime'));
        return $arRuntime[0];
    }

    public static function getSysLogAvg(){
        if(function_exists('sys_getloadavg')){
            return sys_getloadavg();
        }
        return 0;
    }
}